﻿<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<fmt:message key="menu_calendar_label1" var="menu_calendar_label1"/>
<fmt:message key="menu_calendar_label2" var="menu_calendar_label2"/>
<fmt:message key="menu_calendar_label3" var="menu_calendar_label3"/>
<fmt:message key="menu_calendar_label4" var="menu_calendar_label4"/>
<fmt:message key="menu_calendar_label5" var="menu_calendar_label5"/>
<fmt:message key="menu_calendar_label6" var="menu_calendar_label6"/>
<fmt:message key="menu_calendar_label7" var="menu_calendar_label7"/>
<fmt:message key="menu_calendar_label8" var="menu_calendar_label8"/>
<fmt:message key="menu_calendar_label9" var="menu_calendar_label9"/>
<fmt:message key="menu_calendar_label10" var="menu_calendar_label10"/>
<fmt:message key="menu_calendar_label11" var="menu_calendar_label11"/>
<fmt:message key="menu_calendar_label12" var="menu_calendar_label12"/>
<fmt:message key="menu_calendar_label13" var="menu_calendar_label13"/>
<fmt:message key="menu_calendar_label14" var="menu_calendar_label14"/>
<fmt:message key="menu_calendar_label15" var="menu_calendar_label15"/>
<fmt:message key="menu_calendar_label16" var="menu_calendar_label16"/>
<fmt:message key="menu_calendar_label17" var="menu_calendar_label17"/>
<fmt:message key="menu_calendar_label18" var="menu_calendar_label18"/>
<fmt:message key="menu_calendar_label19" var="menu_calendar_label19"/>

<c:if test="${!empty calendarss}">
<TABLE class=leftColumnModuleHead cellSpacing=0 cellPadding=0 
  width="100%" border=0>
  <TBODY>
  <TR>
    <TH class="menu_title_left" width=48>&nbsp;</TH>
      <TH class="menu_title_middle">${menu_calendar_label2}</TH>
    <th width="48" align="right" class="menu_title_right"></th></TR></TBODY></TABLE>
<TABLE class=subMenu cellSpacing=1 cellPadding=0 width="100%" border=0>
  <TBODY>	
	
	<%
	 int i=0;
	%>
	<c:choose> 
	 <c:when test="${sessionScope.showCalendarMonth !=null}">
	    <table width="100%" border="0" cellspacing="1" cellpadding="0" class=subMenu >
	    <tr>
    <td colspan="4"  height="20"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr >
          <td align="left"> &nbsp;<a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=${sessionScope.calendarInfoMonth.priMonth}&day=${sessionScope.calendarInfoMonth.currentDay}&op=priMonth"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/previous.gif" title="${menu_calendar_label3}" border="0"/></a> 
          </td>
          <td align="center" class="monthHeaderH3"> ${sessionScope.calendarInfoMonth.currentYear} ${menu_calendar_label4}
          </td>
          <td align="right"><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=${sessionScope.calendarInfoMonth.nextMonth}&day=${sessionScope.calendarInfoMonth.currentDay}&op=neMonth"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/next.gif" title="${menu_calendar_label5}" border="0"/></a>&nbsp;</td>
        </tr>
      </table> </td>
  </tr>

		<tr height="40" > 
		    <td align="center" <c:choose><c:when test="${sessionScope.selectMonth == '1' }">bgcolor="#FFFAE0" </c:when><c:otherwise>bgcolor="#FFFFFF" </c:otherwise></c:choose> ><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=1"/>">1${menu_calendar_label6}</a></td> 
		    <td align="center" <c:choose><c:when test="${sessionScope.selectMonth == '2' }">bgcolor="#FFFAE0" </c:when><c:otherwise>bgcolor="#FFFFFF" </c:otherwise></c:choose> ><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=2"/>">2${menu_calendar_label6}</a></td> 
		    <td align="center" <c:choose><c:when test="${sessionScope.selectMonth == '3' }">bgcolor="#FFFAE0" </c:when><c:otherwise>bgcolor="#FFFFFF" </c:otherwise></c:choose> ><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=3"/>">3${menu_calendar_label6}</a></td> 
		    <td align="center" <c:choose><c:when test="${sessionScope.selectMonth == '4' }">bgcolor="#FFFAE0" </c:when><c:otherwise>bgcolor="#FFFFFF" </c:otherwise></c:choose> ><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=4"/>">4${menu_calendar_label6}</a></td>
		</tr>
		<tr height="40"> 
		    <td align="center" <c:choose><c:when test="${sessionScope.selectMonth == '5' }">bgcolor="#FFFAE0" </c:when><c:otherwise>bgcolor="#FFFFFF" </c:otherwise></c:choose> ><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=5"/>">5${menu_calendar_label6}</a></td> 
		    <td align="center" <c:choose><c:when test="${sessionScope.selectMonth == '6' }">bgcolor="#FFFAE0" </c:when><c:otherwise>bgcolor="#FFFFFF" </c:otherwise></c:choose> ><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=6"/>">6${menu_calendar_label6}</a></td> 
		    <td align="center" <c:choose><c:when test="${sessionScope.selectMonth == '7' }">bgcolor="#FFFAE0" </c:when><c:otherwise>bgcolor="#FFFFFF" </c:otherwise></c:choose> ><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=7"/>">7${menu_calendar_label6}</a></td> 
		    <td align="center" <c:choose><c:when test="${sessionScope.selectMonth == '8' }">bgcolor="#FFFAE0" </c:when><c:otherwise>bgcolor="#FFFFFF" </c:otherwise></c:choose> ><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=8"/>">8${menu_calendar_label6}</a></td>
		</tr>
		<tr height="40"> 
		    <td align="center" <c:choose><c:when test="${sessionScope.selectMonth == '9' }">bgcolor="#FFFAE0" </c:when><c:otherwise>bgcolor="#FFFFFF" </c:otherwise></c:choose> ><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=9"/>">9${menu_calendar_label6}</td> 
		    <td align="center" <c:choose><c:when test="${sessionScope.selectMonth == '10' }">bgcolor="#FFFAE0" </c:when><c:otherwise>bgcolor="#FFFFFF" </c:otherwise></c:choose> ><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=10"/>">10${menu_calendar_label6}</td> 
		    <td align="center" <c:choose><c:when test="${sessionScope.selectMonth == '11' }">bgcolor="#FFFAE0" </c:when><c:otherwise>bgcolor="#FFFFFF" </c:otherwise></c:choose> ><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=11"/>">11${menu_calendar_label6}</td> 
		    <td align="center" <c:choose><c:when test="${sessionScope.selectMonth == '12' }">bgcolor="#FFFAE0" </c:when><c:otherwise>bgcolor="#FFFFFF" </c:otherwise></c:choose> ><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarMonth&year=${sessionScope.calendarInfoMonth.currentYear}&month=12"/>">12${menu_calendar_label6}</td>
		</tr>
		
	 </c:when>
	 <c:otherwise>
		<c:choose> 
		 <c:when test="${sessionScope.calendarss == null}">
		 <tr>
		 <td colspan="7">
			 <table width="98%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<td align="center"><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarInfo&year=${calendarInfo.priYear}&month=${calendarInfo.currentMonth}&day=${calendarInfo.currentDay}"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/start.gif" title="上一年" border="0"/></a>&nbsp;<a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarInfo&year=${calendarInfo.currentYear}&month=${calendarInfo.priMonth}&day=${calendarInfo.currentDay}&op=priMonth"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/previous.gif" title="上一月" border="0"/></a></td>
				<td class="monthHeaderH3" align="center">${calendarInfo.currentYear}年${calendarInfo.currentMonth}月</td>
				<td align="center"><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarInfo&year=${calendarInfo.currentYear}&month=${calendarInfo.nextMonth}&day=${calendarInfo.currentDay}&op=neMonth"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/next.gif" title="下一月" border="0"/></a>&nbsp;<a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarInfo&year=${calendarInfo.nextYear}&month=${calendarInfo.currentMonth}&day=${calendarInfo.currentDay}"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/end.gif" title="下一年" border="0"/></a></td>
			  </tr>
			</table>
			 </td>
			 </tr>
			 <tr>
			 
	      <TD height="20" align="center" class="monthCalBodyTHDay">${menu_calendar_label9}</TD>
	      <TD class="monthCalBodyTHDay" align="center">${menu_calendar_label10}</TD><TD class="monthCalBodyTHDay" align="center">${menu_calendar_label11}</TD><TD class="monthCalBodyTHDay" align="center">${menu_calendar_label12}</TD><TD class="monthCalBodyTHDay" align="center">${menu_calendar_label13}</TD><TD class="monthCalBodyTHDay" align="center">${menu_calendar_label14}</TD><TD class="monthCalBodyTHDay" align="center">${menu_calendar_label15}</TD>
			 </tr>
			 <c:forEach var="calendars" items="${calendarss}">
			 	    <TD align="center" <c:if test="${fn:contains(calendars.flag,'P') || fn:contains(calendars.flag,'N')}"> bgcolor="#ffffff" color="#999999" height="20" align="center" </c:if><c:if test="${fn:contains(calendars.selectDay,'1')}"></c:if>>
					<A class=subMenuLink href="<c:url value="/modules/calendar/calendars.do?method=showCalendarInfo&year=${calendars.year}&month=${calendars.month}&day=${calendars.day}"/>" <c:choose><c:when test="${fn:contains(calendars.titleCount,'0')}"> title="${menu_calendar_label16}" </c:when><c:otherwise> title="${menu_calendar_label17}${calendars.titleCount}${menu_calendar_label18}   ${menu_calendar_label19}${calendars.title}"</c:otherwise></c:choose> >
					<c:choose><c:when test="${fn:contains(calendars.selectDay,'1')}"><font color="#FF0000">${calendars.name}</font></c:when><c:otherwise>${calendars.name}</c:otherwise></c:choose><c:choose><c:when test="${fn:contains(calendars.titleCount,'0')}"></c:when><c:otherwise><img src="../../themes/${sessionScope.loginUser.theme}/images/newwork3.gif" border="0"/></c:otherwise></c:choose>
			<%
			    i++;
			   if(i%7==0){
			   %>
			   <tr></tr>
			   <%
			   }
			%>   	   
			</c:forEach>
			
		     <!--  </TR>	-->
		      
		  </c:when>   
		  <c:otherwise> 
		     <TR>
		 		<td colspan="7">
				<table width="98%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
					<td align="center"><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarInfo&year=${sessionScope.calendarInfo.priYear}&month=${sessionScope.calendarInfo.currentMonth}&day=${sessionScope.calendarInfo.currentDay}"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/start.gif" title="${menu_calendar_label7}" border="0"/></a>&nbsp;<a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarInfo&year=${sessionScope.calendarInfo.currentYear}&month=${sessionScope.calendarInfo.priMonth}&day=${sessionScope.calendarInfo.currentDay}&op=priMonth"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/previous.gif" title="${menu_calendar_label3}" border="0"/></a></td>
					
	          <td class="monthHeaderH3" align="center" >${sessionScope.calendarInfo.currentYear}${menu_calendar_label4}${sessionScope.calendarInfo.currentMonth}${menu_calendar_label6}</td>
					<td align="center"><a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarInfo&year=${sessionScope.calendarInfo.currentYear}&month=${sessionScope.calendarInfo.nextMonth}&day=${sessionScope.calendarInfo.currentDay}&op=neMonth"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/next.gif" title="${menu_calendar_label5}" border="0"/></a>&nbsp;<a href="<c:url value="/modules/calendar/calendars.do?method=showCalendarInfo&year=${sessionScope.calendarInfo.nextYear}&month=${sessionScope.calendarInfo.currentMonth}&day=${sessionScope.calendarInfo.currentDay}"/>" border="0"><img src="../../themes/${sessionScope.loginUser.theme}/images/end.gif" title="${menu_calendar_label8}" border="0"/></a></td>
				  </tr>
				</table>
				</td>
			</tr>
			<tr>
			 
	    <TD height="15" align="center" class="monthCalBodyTHDay">${menu_calendar_label9}</TD>
	    <TD class="monthCalBodyTHDay" align="center">${menu_calendar_label10}</TD><TD class="monthCalBodyTHDay" align="center">${menu_calendar_label11}</TD><TD class="monthCalBodyTHDay" align="center">${menu_calendar_label12}</TD><TD class="monthCalBodyTHDay" align="center">${menu_calendar_label13}</TD><TD class="monthCalBodyTHDay" align="center">${menu_calendar_label14}</TD><TD class="monthCalBodyTHDay" align="center">${menu_calendar_label15}</TD>
			</tr>
	
			 <c:forEach var="calendars" items="${sessionScope.calendarss}"  >   
			 	    <TD  height="20"<c:if test="${fn:contains(calendars.flag,'P') || fn:contains(calendars.flag,'N')}"> bgcolor="#ffffff" color="#999999" align="center" </c:if> <c:if test="${fn:contains(calendars.selectDay,'1')}"> </c:if>>
					<A class=subMenuLink href="<c:url value="/modules/calendar/calendars.do?method=showCalendarInfo&year=${calendars.year}&month=${calendars.month}&day=${calendars.day}"/>" <c:choose><c:when test="${fn:contains(calendars.titleCount,'0')}"> title="${menu_calendar_label16}" </c:when><c:otherwise> title="${menu_calendar_label17}${calendars.titleCount}${menu_calendar_label18}   ${menu_calendar_label19}${calendars.title}"</c:otherwise></c:choose> >
					<c:choose><c:when test="${fn:contains(calendars.selectDay,'1')}"><font color="#FF0000">${calendars.name}</font></c:when> <c:otherwise>${calendars.name}</c:otherwise></c:choose><c:choose><c:when test="${fn:contains(calendars.titleCount,'0')}"></c:when><c:otherwise><img width="4px" src="../../themes/${sessionScope.loginUser.theme}/images/newwork3.gif" border="0"/></c:otherwise></c:choose></A></TD>      
		
		
			<%  
			    i++;  
			   if(i%7==0){
			   %>    
			   <tr></tr>
			   <%
			   }
			%>   	   
			</c:forEach>
	     <!--  </TR>-->	
	     </c:otherwise>
	    </c:choose>
	  </c:otherwise>
   </c:choose>
	
	</TBODY>
</TABLE>
</c:if>
